/**
 * Data Access Object Interface
 * Available methods and constants for data access
 */

package libman.db;

import libman.*;
import libman.Book.*;

/**
 *  LibManDAO Interface
 */
public interface LibManDAO {

    public static final String HOST = "localhost";
    public static final String PORT = "1527";
    public static final String DB   = "LibraryManager";

    //CRUD -- create, read, update, delete
    public void    create(Book book)   throws LibManException;
    public Book    read(String needle) throws LibManException;
    public Book[]  readAll()           throws LibManException;
    public void    update(Book book)   throws LibManException;
    public void    delete(Book book)   throws LibManException;
    public boolean exists(Field field, String value);

}//LibManDAO Interface
